package com.xxx.meter.ui.main;

import android.content.Intent;
import android.os.Bundle;
import android.os.CountDownTimer;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.view.animation.AlphaAnimation;
import android.view.animation.ScaleAnimation;

import com.xxx.meter.R;
import com.xxx.meter.base.BaseActivity;

public class SplashActivity extends BaseActivity {

    private CountDownTimer countDownTimer = new CountDownTimer(3000, 1000) {
        @Override
        public void onTick(long l) {

        }

        @Override
        public void onFinish() {
            startActivity(new Intent(SplashActivity.this, MainActivity.class));
            finish();
        }
    };

    @Override
    protected int getLayoutId() {
        return R.layout.activity_splash;
    }

    @Override
    protected void initData() {
        countDownTimer.start();
        View viewById = findViewById(R.id.splash);
        viewById.startAnimation(new AlphaAnimation(0, 1));
    }
}
